<?php include_stylesheets_for_form($form) ?>
<?php include_javascripts_for_form($form) ?>

<form id="form_usuario_referencia" action="<?php echo url_for('usuario_referencia/'.($form->getObject()->isNew() ? 'create' : 'update').(!$form->getObject()->isNew() ? '?id_usuario_refeencia='.$form->getObject()->getIdUsuarioRefeencia() : '')) ?>" method="post" <?php $form->isMultipart() and print 'enctype="multipart/form-data" ' ?>>
<?php if (!$form->getObject()->isNew()): ?>
<input type="hidden" name="sf_method" value="put" />
<input type="hidden" name="id_usuario_refeencia" value="<?php echo $form->getObject()->getIdUsuarioRefeencia() ?>" />
<?php endif; ?>
	<?php echo $form->renderHiddenFields() ?>
  <table class="form">
    <tbody>
      <tr><th colspan="2" class="title">Dados usuario_referencia</th></tr>	
      <?php echo $form->renderGlobalErrors() ?>
      <tr>
        <th><?php echo $form['no_banco']->renderLabel() ?></th>
        <td>
          <?php echo $form['no_banco'] ?>
          <?php echo form_error('no_banco'); ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['nu_agencia']->renderLabel() ?></th>
        <td>
          <?php echo $form['nu_agencia'] ?>
          <?php echo form_error('nu_agencia'); ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['nu_telefone_banco']->renderLabel() ?></th>
        <td>
          <?php echo $form['nu_telefone_banco'] ?>
          <?php echo form_error('nu_telefone_banco'); ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['no_comercial']->renderLabel() ?></th>
        <td>
          <?php echo $form['no_comercial'] ?>
          <?php echo form_error('no_comercial'); ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['nu_telefone_comercial']->renderLabel() ?></th>
        <td>
          <?php echo $form['nu_telefone_comercial'] ?>
          <?php echo form_error('nu_telefone_comercial'); ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['no_fornecedor']->renderLabel() ?></th>
        <td>
          <?php echo $form['no_fornecedor'] ?>
          <?php echo form_error('no_fornecedor'); ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['nu_telefone_fornecedor']->renderLabel() ?></th>
        <td>
          <?php echo $form['nu_telefone_fornecedor'] ?>
          <?php echo form_error('nu_telefone_fornecedor'); ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['no_amigo']->renderLabel() ?></th>
        <td>
          <?php echo $form['no_amigo'] ?>
          <?php echo form_error('no_amigo'); ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['nu_telefone_amigo']->renderLabel() ?></th>
        <td>
          <?php echo $form['nu_telefone_amigo'] ?>
          <?php echo form_error('nu_telefone_amigo'); ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['id_usuario']->renderLabel() ?></th>
        <td>
          <?php echo $form['id_usuario'] ?>
          <?php echo form_error('id_usuario'); ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['created_at']->renderLabel() ?></th>
        <td>
          <?php echo $form['created_at'] ?>
          <?php echo form_error('created_at'); ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $form['updated_at']->renderLabel() ?></th>
        <td>
          <?php echo $form['updated_at'] ?>
          <?php echo form_error('updated_at'); ?>
        </td>
      </tr>
    </tbody>
  </table>
</form>

<?php 
	comandos_form(
		link_to(
			':: Voltar ::',
			'usuario_referencia/filter',
			array('class' => 'botao')
		),
		button_to_function(
			':: Salvar ::',
			"$('#form_usuario_referencia').submit()",
			array('class' => 'botao')
		)
	);
?>